Object.defineProperty(exports, "__esModule", {
    value: !0
});

var t = function(t, e) {
    return function() {
        for (var n = arguments.length, r = Array(n), o = 0; o < n; o++) r[o] = arguments[o];
        return r.length ? t.apply(e, r) : t.call(e);
    };
}, e = function() {
    for (var t = arguments.length, e = Array(t), n = 0; n < t; n++) e[n] = arguments[n];
    return Object.assign.apply(Object, [ {} ].concat(e));
};

exports.default = Behavior({
    properties: {
        visible: {
            type: Boolean,
            value: !1
        }
    },
    methods: {
        $$mergeOptionsAndBindMethods: function() {
            var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.fns, r = Object.assign({}, e);
            for (var o in r) r.hasOwnProperty(o) && "function" == typeof r[o] && (n[o] = t(r[o], this), 
            delete r[o]);
            return r;
        },
        $$setData: function() {
            for (var t = this, n = arguments.length, r = Array(n), o = 0; o < n; o++) r[o] = arguments[o];
            var i = e.apply(void 0, [ {} ].concat(r));
            return new Promise(function(e) {
                t.setData(i, e);
            });
        },
        $$requestAnimationFrame: function() {
            var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function() {}, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1e3 / 60;
            return new Promise(function(t) {
                return setTimeout(t, e);
            }).then(t);
        }
    },
    created: function() {
        this.fns = {};
    },
    detached: function() {
        this.fns = {};
    }
});